Skip to content

feat(wokwi): Add support for using the USB Serial JTAG#421

Merged
hfudev merged 2 commits into
espressif:mainfrom
lucasssvaz:feat/wokwi_jtag
May 26, 2026
Merged

feat(wokwi): Add support for using the USB Serial JTAG#421
hfudev merged 2 commits into
espressif:mainfrom
lucasssvaz:feat/wokwi_jtag

Conversation

@lucasssvaz
Copy link
Copy Markdown
Member

Description

This pull request adds support for using USB Serial JTAG as the serial interface in Wokwi simulations, alongside comprehensive unit tests and integration into the pytest-embedded workflow. It introduces a new CLI flag, updates diagram processing to support the new interface, and ensures that the original diagram files remain unmodified. Additionally, the changes are well-documented in the README and thoroughly tested.

USB Serial JTAG Support and Diagram Handling:

  • Added a new --wokwi-usb-serial-jtag command-line option, allowing users to select USB Serial JTAG instead of UART for serial communication in Wokwi simulations. This is reflected in both the plugin options and dut_factory interfaces. [1] [2] [3] [4] [5]
  • Implemented logic in Wokwi to override the serial interface in diagram files: sets serialInterface to USB_SERIAL_JTAG on the board part and removes $serialMonitor connections. The modified diagram is written to a temporary file, preserving the original. [1] [2] [3] [4]
  • Updated the README with documentation and usage instructions for the new USB Serial JTAG feature.

Testing and Validation:

  • Added a suite of unit tests for the serial interface override logic, verifying correct modification of diagrams, preservation of non-serial connections, non-mutation of the original file, and proper handling of missing or existing attributes. [1] [2]

Integration and Parametrization:

  • Extended all relevant pytest-embedded plugin and fixture code to accept and propagate the new wokwi_usb_serial_jtag parameter, supporting both CLI and parametrized test usage. [1] [2] [3]

These changes collectively make it easy to test firmware using USB Serial JTAG in Wokwi, with robust handling and clear user documentation.

Testing

Locally and CI

@github-actions
Copy link
Copy Markdown

Title Coverage Tests Skipped Failures Errors Time
Qemu Coverage 7 0 💤 0 ❌ 0 🔥 25.357s ⏱️
3.10 ARM64 Coverage 113 18 💤 0 ❌ 0 🔥 10m 50s ⏱️

@hfudev hfudev merged commit 70f4e74 into espressif:main May 26, 2026
5 of 6 checks passed
@hfudev
Copy link
Copy Markdown
Member

hfudev commented May 26, 2026

LGTM. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants